package com.tx.gateway.ribbon.config;

import com.netflix.loadbalancer.IPing;
import com.netflix.loadbalancer.PingUrl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RibbonConfig {

    @Value("${spring.cloud.loadbalancer.health-check.path.business-server}")
    private String healthPath;

    @Bean
    public IPing iPing() {
        return new PingUrl(false, healthPath);
    }

}
